package com.openbravo.pos.catalog;

import com.openbravo.beans.JFlowPanel;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.Image;
import java.awt.Insets;
import java.awt.event.ActionListener;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JPanel;

public class JProductsSelector extends JPanel
{
  private JFlowPanel flowpanel;

  public JProductsSelector()
  {
    initComponents();
    this.flowpanel = new JFlowPanel();
    add(this.flowpanel, "Center");
  }

  public void addProduct(Image paramImage, String paramString, ActionListener paramActionListener)
  {
    JButton localJButton = new JButton();
    localJButton.applyComponentOrientation(getComponentOrientation());
    localJButton.setText(paramString);
    localJButton.setIcon(new ImageIcon(paramImage));
    localJButton.setFocusPainted(false);
    localJButton.setFocusable(false);
    localJButton.setRequestFocusEnabled(false);
    localJButton.setHorizontalTextPosition(0);
    localJButton.setVerticalTextPosition(3);
    localJButton.setMargin(new Insets(2, 2, 2, 2));
    localJButton.setMaximumSize(new Dimension(80, 70));
    localJButton.setPreferredSize(new Dimension(80, 70));
    localJButton.setMinimumSize(new Dimension(80, 70));
    localJButton.addActionListener(paramActionListener);
    this.flowpanel.add(localJButton);
  }

  private void initComponents()
  {
    setLayout(new BorderLayout());
  }
}

/* Location:           D:\PowerFulPOS-2.30.2\openbravopos.jar
 * Qualified Name:     com.openbravo.pos.catalog.JProductsSelector
 * JD-Core Version:    0.6.0
 */